import React from 'react'
import ReactDOM from 'react-dom/client'
import './index.css'
import App from './App'
import { BrowserRouter } from 'react-router-dom'
import {DndProvider} from 'react-dnd'
import {HTML5Backend} from 'react-dnd-html5-backend'
import { Provider } from 'react-redux'
import {store} from "./starter/redux/store";
import { ConfigProvider } from 'antd'
import dayjs from 'dayjs'
import ruRU from 'antd/locale/ru_RU'
import updateLocale from 'dayjs/plugin/updateLocale'

const locale = ruRU
dayjs.extend(updateLocale)
dayjs.locale('ru')
dayjs.updateLocale('en', {
  weekStart: 1,
});


const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
)
root.render(
  <React.StrictMode>
    <ConfigProvider locale={locale}>
      <DndProvider backend={HTML5Backend}>
          <Provider store={store}>
            <BrowserRouter>
              <App />
            </BrowserRouter>
          </Provider>
      </DndProvider>
    </ConfigProvider>
  </React.StrictMode>
)

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals()
